﻿using System;
using Dexter.Core.EventArgs;
using Dexter.Domain.Model;
using Dexter.Domain.Results;

namespace Dexter.Services {
	/// <summary>
	/// 	Rapresents the gateway for all service to save, retrieve and manipulate data for <see cref="LegacyUrl" /> .
	/// </summary>
	public interface ILegacyUrlService {
		///<summary>
		///	Return a list of LegacyUrl with all properties loaded.
		///</summary>
		///<param name = "pageIndex">Index of the page (0 based).</param>
		///<param name = "pageSize">The number of items to retrieve.</param>
		///<returns>An concrete implementation of <see cref="IPagedResult{T}"/>. The result will never be null.</returns>
		IPagedResult<LegacyUrl> GetListPaged(int pageIndex, int pageSize);

		///<summary>
		///	Return a list of LegacyUrl with all properties loaded.
		///</summary>
		///<param name = "pageIndex">Index of the page (0 based).</param>
		///<param name = "pageSize">The number of items to retrieve.</param>
		///<returns>An concrete implementation of <see cref="IPagedResult{T}"/>. The result will never be null.</returns>
		/// <param name="enableTracking">if set to <c>true</c> the tracking system of the return object will be enable.</param>
		IPagedResult<LegacyUrl> GetListPaged(int pageIndex, int pageSize, bool enableTracking);

		/// <summary>
		/// This event will raise when a list of <see cref="LegacyUrl"/> will retrieved by the implementation of <see cref="ILegacyUrlService.GetListPaged(int,int)"/>.
		/// </summary>
		event EventHandler<GenericEventArgs<IPagedResult<LegacyUrl>>> LegacyUrlRetrieved;
	}
}